{% extends 'accounts/base.html' %}

{% block title %}同步权限{% endblock %}

{% block content %}
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
    <h1 class="h2">同步权限</h1>
</div>

<div class="row">
    <div class="col-md-8">
        <div class="card">
            <div class="card-header">
                <h5 class="card-title mb-0">
                    <i class="fas fa-sync"></i> 同步权限
                </h5>
            </div>
            <div class="card-body">
                <p>此操作将扫描项目中的所有URL路由，并自动创建对应的权限记录。</p>
                <p>新发现的URL将被添加为权限，您可以随后在角色管理中分配这些权限。</p>
                
                <form method="post">
                    {% csrf_token %}
                    <div class="mb-3">
                        <button type="submit" class="btn btn-primary">
                            <i class="fas fa-sync"></i> 开始同步
                        </button>
                        <a href="{% url 'accounts:role_list' %}" class="btn btn-secondary">
                            <i class="fas fa-arrow-left"></i> 返回
                        </a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock %}